package br.com.sis.rh.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

@Entity
public class CargoPretendido extends Entidade {

	/**
	 * Serial UID.
	 */
	private static final long serialVersionUID = 1L;
	
	@OneToOne
	private Cargo cargo;

	private String nivel;
	
	@ManyToOne
	@JoinTable(name="Candidato_CargoPretendido", 
			joinColumns={@JoinColumn(name="cargopretendido_id", referencedColumnName="id")
		},	
			inverseJoinColumns={@JoinColumn(name="candidato_id", referencedColumnName="id")}
	)
	private Candidato candidato;	

	public Cargo getCargo() {
		return cargo;
	}

	public void setCargo(Cargo cargo) {
		this.cargo = cargo;
	}

	public String getNivel() {
		return nivel;
	}

	public void setNivel(String nivel) {
		this.nivel = nivel;
	}

	public Candidato getCandidato() {
		return candidato;
	}

	public void setCandidato(Candidato candidato) {
		this.candidato = candidato;
	}
	
}
